<?php
	$cat1 = db()->query("select * from goods_cat where parent_id=0 and status=0 order by sort desc,id desc");
?>
        <div class='main_menu fl ' id='GoodsMenuDiv' style='display:none'>
            <div class='main_menu_bg'></div>
            <ul class='meun_wrap'>

                <?php foreach($cat1 as $v1):?>
                <li>
                    <dl class='parent_title'>
                        <dt><i class='ico iconfont'>&#xe604;</i><a href='/goods/lists?cat_id=<?=$v1["id"]?>'><?=$v1['cat_title']?></a><b class='icon'>></b></dt><dd><?=$v1['sub_title']?></dd>
                    </dl>
                    <div class='child_node'>
                        <?php
                        $cat2 = db()->query("select * from goods_cat where parent_id={$v1['id']} and status=0 order by sort desc,id desc");
                        foreach($cat2 as $v2):
                        ?>
                        <dl class='child_dl'>
                            <dt><a href='/goods/lists?cat_id=<?=$v2["id"]?>'><?=$v2['cat_title']?></a></dt>
                            <dd>
                                <?php
                                $cat3 = db()->query("select * from goods_cat where parent_id={$v2['id']} and status=0 order by sort desc,id desc");
                                foreach($cat3 as $v3):
                                ?>
                                <a href='/goods/lists?cat_id=<?=$v3["id"]?>'><?=$v3['cat_title']?></a>
                                <?php endforeach;?>
                            </dd>
                        </dl>
                        <?php endforeach;?>
                    </div>
                </li>
                <?php endforeach;?>
            </ul>
        </div>
